package edit;

import java.util.ArrayList;

import skyproc.GRUP;
import skyproc.MajorRecord;
import skyproc.Mod;
import skyproc.SPGlobal;

public abstract class AbstractRecordHolder implements HolderInterface {

	protected MajorRecord record;
	protected ArrayList<Mod> masters;
	
	public AbstractRecordHolder(MajorRecord record) {
		this.record = record;
		
		masters = new ArrayList<Mod>();
				
		for(Mod mod : SPGlobal.getDB()) {
			for(GRUP grup : mod.getGRUPs().values()) {
				if(grup.contains(record.getForm())) {
					masters.add(mod);
				}
			}
		}
		
	}
	
	public ArrayList<Mod> getMasters() {
		return masters;
	}
}
